<%@page import="lib_model.Account.Account"%>
<%@page import="lib_model.Account.Account_group"%>
<%@page import="java.util.ArrayList"%>
<%@page import="lib_model.Orther.ReturnObj"%>
<%@page import="lib_model.Product.Tax_product"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<jsp:include page="../templates/Admin.jsp"></jsp:include>
Manager - Account
<jsp:include page="../templates/Title.jsp"></jsp:include>
<script type="text/javascript">
	$(document).ready(function() {
		$("#createfac").hide();
		$("#btcreate").click(function() {
			$("#createfac").fadeIn();
		});

		$(".editac").click(function(){
			window.location = "../administrator/edit-account.jsp?user="+$(this).attr("acuser");
		});
	});
</script>
<jsp:include page="../templates/StyleAd.jsp"></jsp:include>
<div class="body-center w960">
<h2 class="title-show">Account</h2>
<table class="tb">

	<thead>

		<tr>
			<th align="left" width="20%">Username</th>
			<th align="left" width="20%">Role</th>
			<th align="left" width="20%">Email</th>
			<th align="left" width="20%">Date Create</th>
		</tr>
	</thead>
	<%
		Account taxs = new Account();
		ReturnObj rs = taxs.Select();
		ArrayList<Account> arr = (ArrayList<Account>) rs.ObjResult;
	%>
	<tbody>
		<%
			for (Account tax : arr) {
			Account_group g = new Account_group(tax.group_id_ref);
			g = (Account_group) g.GetInformation().ObjResult;
		%>
		
		<tr>
			<td><b><%=tax.username %></b></td>
			<td><b>
			<%=g.group_name %></b></td>
			<td><b><%=tax.email%></b></td>
			<td><b><%=tax.date_create%></b></td>
			<td><b><input type="button" value="Edit Group" class="editac" acuser="<%=tax.username %>"/></b></td>
		</tr>
		<%
			}
		%>
	</tbody>
</table>
</div>

<jsp:include page="../templates/Footer.jsp"></jsp:include>